//
//  MyTableViewCell.m
//  UI13-豆瓣电影
//
//  Created by dllo on 15/12/23.
//  Copyright © 2015年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "MyTableViewCell.h"

@implementation MyTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.beijing = [[UIImageView alloc]init];
        [self.contentView addSubview:_beijing];
        
        self.baise = [[UIImageView alloc]init];
        [self.beijing addSubview:_baise];
        
        self.time = [[UIImageView alloc]init];
        [self.baise addSubview:_time];
        
        self.dizhi = [[UIImageView alloc]init];
        [self.baise addSubview:_dizhi];
        
        self.leixing = [[UIImageView alloc]init];
        [self.baise addSubview:_leixing];
        
        
        self.title = [[UILabel alloc]init];
    //    _title.backgroundColor = [UIColor yellowColor];
        [self.beijing addSubview:_title];


 
        self.begin = [[UILabel alloc]init];
      //   _begin.backgroundColor = [UIColor yellowColor];
        [self.baise addSubview:_begin];
        
        
        self.address = [[UILabel alloc] init];
      //   _address.backgroundColor = [UIColor redColor];
        [self.baise addSubview:_address];

   
        self.category = [[UILabel alloc]init];
      //  _category.backgroundColor = [UIColor yellowColor];
        [self.baise addSubview:_category];

       
        self.wisher = [[UILabel alloc]init];
     //  _wisher.backgroundColor = [UIColor yellowColor];
        [self.baise addSubview:_wisher];

        self.participant = [[UILabel alloc]init];
     //   _participant.backgroundColor = [UIColor yellowColor];
        [self.baise addSubview:_participant];
        
        self.photo = [[UIImageView alloc]init];
       _photo.backgroundColor = [UIColor redColor];
      [self.baise addSubview:_photo];


    }
    return self;

}

-(void)layoutSubviews
{

    [super layoutSubviews];
    _beijing.frame = CGRectMake(5, 15, self.contentView.bounds.size.width - 10, self.contentView.bounds.size.height - 10);
    _beijing.image = [UIImage imageNamed:@"bg_eventlistcell"];
    
    _title.frame = CGRectMake(5, 5, 375, 30);
    
    _baise.frame = CGRectMake(5, 45, self.contentView.bounds.size.width - 20, self.contentView.bounds.size.height - 65);
    _baise.image = [UIImage imageNamed:@"bg_share_large"];
    
    _time.frame = CGRectMake(5, 5, 30, 30);
    _time.image = [UIImage imageNamed:@"icon_date"];
    
    _begin.frame = CGRectMake(37, 5, 250, 30);
    
    _dizhi.frame = CGRectMake(5, 42, 30, 30);
    _dizhi.image = [UIImage imageNamed:@"icon_spot"];
    
    _address.frame = CGRectMake(37, 42, 250, 30);

    _leixing.frame = CGRectMake(5, 79, 30, 30);
    _leixing.image = [UIImage imageNamed:@"icon_catalog"];
    
    _category.frame = CGRectMake(37,79 , 200, 30);
    
    _wisher.frame = CGRectMake(15, 160, 120, 30);
    _participant.frame = CGRectMake(150, 160, 100, 30);

    
    _photo.frame = CGRectMake(260, 70, 80, 130);
    
    

}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
